package utils

import (
	"context"
	"github.com/goravel/framework/facades"
)

func CurrentLocale() string {
	return facades.App().CurrentLocale(context.Background())
}

func Contains[T comparable](arr []T, target T) bool {
	for _, v := range arr {
		if v == target {
			return true
		}
	}
	return false
}

func IsNull(slice []any) bool {
	return slice != nil && len(slice) == 0
}
